<?php
namespace Badmins\Model;
use Think\Model;
class AdModel extends Model{
	protected $_validate = array(
			array('place_id','number','广告位置名称必须选择'),
			array('photo','require','广告图片必须'),
			array('sort','number','权重值必须'),
			array('end_time','require','结束时间必须'),
			array('start_time,end_time','cktime','结束时间必须大于开始时间',1,'callback',3),
	);
	public function cktime($data){
		if($data['end_time']<$data['start_time']){
			return false;
		}else{
			return true;
		}
	}
}